import { h, ref, unref, computed } from 'vue';
import { useLocale } from '@/locales/useLocale';
const { getLocale } = useLocale();

const formLabel = {
  //中文
  zh_CN: {
    // 出款卡管理/表格编辑/from  px模式
    editPaymentCard: 85, //
    // vip等级/反水配置/from  珊格模式
    reverseWater: 2,
    // vip等级/奖金条件/from   px模式 珊格模式   px模式
    bonusConditions: [500, 6, 80], //modal宽度  label宽度   输入框后缀宽度
    //财务管理/公司入款/入款审核  px模式
    softwareReview: [80, 120], //公司入款   货币入款
    //财务管理/线上取款/出款审核  px模式
    withdrawalDetails: 80,
    //添加代付平台
    paymentPlatform: 120,
  },
  //英文
  en_US: {
    editPaymentCard: 85,
    reverseWater: 5,
    bonusConditions: [650, 9],
    softwareReview: [140, 180],
    withdrawalDetails: 100,
  },
  //越南语
  vi_VN: {
    editPaymentCard: 180,
    reverseWater: 5,
    bonusConditions: [650, 9, 210],
    softwareReview: [140, 180],
    withdrawalDetails: 160,
    paymentPlatform: 210,
  },
  //葡萄牙语
  pt_BR: {
    editPaymentCard: 85,
    reverseWater: 5,
    bonusConditions: [650, 9],
  },
  //泰语
  th_TH: {
    editPaymentCard: 85,
    bonusConditions: [650, 9],
  },
  //印度语
  hi_IN: {
    editPaymentCard: 85,
    bonusConditions: [650, 9],
  },
};
export function useFormLabelWidth(key: string) {
  let currentLocale = unref(getLocale);
  let width = formLabel[currentLocale][key];
  if (width) {
    return width;
  } else {
    console.error('未设置该表单label宽度！');
  }
  return;
}
